package com.stooscloud.core.redis;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;

import java.util.List;

@Slf4j
public class IdGeneratorUtil {

    public static long getId(String host,int port,int timeout,String password,String luaSha,String tab,long userId){
        IdGenerator idGenerator = IdGenerator.builder().addHost(host, port, timeout,password,luaSha).build();
        long id = idGenerator.next(tab, userId);
        log.info("生成的系统唯一编号buildId:{}",id);
        return id;
    }
}
